package zzk.test.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import zzk.base.mybatisPlus.Model.MyBaseModel;

@Data//生成getter和setter
@Accessors(chain = true)//生成sette并且传回当前对象，https://blog.csdn.net/weixin_38229356/article/details/82937420
@TableName("T_USER")//表名注解
//此注解会生成equals(Object other) 和 hashCode()方法。根据所有非静态，非瞬态的属性进行比较。后面跟上(callSuper = true)是有继承关系时候，也算上父属性
@EqualsAndHashCode()
public class User extends MyBaseModel {
    /**
     * 主键ID
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    @TableField("NAME")
    private String name;

    /**
     * 年龄
     */
    @TableField("AGE")
    private Integer age;

    /**
     * 删除状态
     */
    @TableField(value = "IS_DELETED", fill = FieldFill.INSERT)
    @TableLogic
    private String isDeleted;


}
